<template>
  <div>
    <router-link :to="{name:'summerDetail',query:{id:item._id}}"  v-for='item in goodsList'>
      <van-card
        :num="item.quantity"
        tag="标签"
        :price="item.price"
        :desc="item.descriptions"
        :title="item.name"
        :thumb="item.coverImg"
        origin-price="10.00"
      />
    </router-link>

  </div>
</template>

<script>
  import * as api from '@/api/getProList.js';
  export default {
    name:'Summer',
    data(){
      return {
        active:0,
        pageNum:1,
        pageSize:10,
        pro_id:'',
        goodsList:[]
      }
    },
    beforeCreate(){

    },
    mounted(){
      this.pro_id = this.$route.query.pro_id;
      this.active = this.$route.query.active;
      this.$emit('getHomeMsg',{active:this.active});
      api.getProList({
        per:this.pageSize,
        page:this.pageNum,
        product_category:this.pro_id
      }).then(res=>{
        if(res.status == '200'){
          this.goodsList = res.data.products;
        }else{
        }
      })
    }
  }
</script>

<style scoped>
  .van-card__title,.van-card__desc,.van-card__bottom{
    text-align: left;
  }
</style>
